package com.fhz.day007;

import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;

/**
 * 时间:2022/5/25
 *
 * @author msfeng
 * 简述: TODO
 */
public class MyMainViewModelFactory implements ViewModelProvider.Factory {

    @NonNull
    @Override
    public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
        return (T) new MainViewModel(new MainRepository(new MainModel()));
    }
}

